﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TeamDeploy.Tasks.Tests
{
    [TestClass]
    public class DeviceControllerTests
    {

        [TestMethod]
        public void InstallExecute()
        {

            DeviceController task = new DeviceController();

            task.BuildEngine = new MockBuild();
            task.DeviceControllerAppPathFileName = "C:\\x10communicator\\x10communicator.exe";
            task.RemoteExecutePathFilename = "c:\\pstools\\psexec.exe";
            task.HouseCode = "A";
            task.DeviceCode = 2;
            task.StartTime = "7:00";
            task.EndTime = "17:00";
            task.Command = 1;

            task.TargetMachine = Environment.MachineName;

            Assert.IsTrue(task.Execute(), "Execute Failed");

            task.Command = 0;
            Assert.IsTrue(task.Execute(), "Execute Failed");
        }


    }
}
